package Homework.Homework03;

import org.w3c.dom.ls.LSOutput;

public class CallServiceImp extends Collect implements CallService{

    @Override
    public void call(int minutes, SIMCard simCard) {
        simCard.setTalkTime(simCard.getTalkTime() - minutes);
        System.out.println("已经使用的通话分钟数为：" + minutes);
    }
    private int minutes; // 通话时长
    private int message; // 短信条数

    @Override
    public void show() {
        System.out.println("通话时长：" + getMinutes() + "  短信条数："  + getMessage() + "  每月资费：" + getMonthlyRate() + "\t");
    }
    public CallServiceImp() {
    }

    public CallServiceImp(int minutes, int message, int monthlyRate) {
        this.minutes = minutes;
        this.message = message;
        super.monthlyRate = monthlyRate;
    }

    public int getMinutes() {
        return minutes;
    }

    public void setMinutes(int minutes) {
        this.minutes = minutes;
    }

    public int getMessage() {
        return message;
    }

    public void setMessage(int message) {
        this.message = message;
    }

    public int getMonthlyRate() {
        return monthlyRate;
    }

    public void setMonthlyRate(int monthlyRate) {
        this.monthlyRate = monthlyRate;
    }
    public void show1() {
        System.out.println("通话时长：" + (getMinutes() - minutes) + "  短信条数："  + (getMessage() -message));
    }
}
